package com.schoolvisitors.dto;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.time.LocalTime;

@Data
public class CreateRoomDto {
    private Long id;

    @NotNull(message = "楼层ID不能为空")
    private Long floorId;

    @NotNull(message = "房间编号不能为空")
    private Long number;

    @NotBlank(message = "房间名称不能为空")
    @Size(max = 255, message = "房间名称长度不能超过255个字符")
    private String subType;

    @NotNull(message = "隔间数量不能为空")
    @Min(value = 1, message = "隔间数量必须大于0")
    @Max(value = 100, message = "隔间数量不能大于100")
    private Short cubicleCount;

    @NotBlank(message = "房间类型不能为空")
    @Pattern(regexp = "^(MEETING|LAB)$", message = "房间类型错误")
    private String type;

    @NotNull(message = "容量不能为空")
    @Min(value = 0, message = "容量不能为负数")
    private Long capacity;

    @NotNull(message = "积分消耗不能为空")
    @Min(value = 0, message = "积分消耗不能为负数")
    private Long pointsCost;

    @NotBlank(message = "图片不能为空")
    private String img;

    @NotNull(message = "是否可预约不能为空")
    private Boolean available;

    @NotNull(message = "开放时间不能为空")
    private LocalTime openTime;

    @NotNull(message = "开放结束时间不能为空")
    private LocalTime closeTime;
}
